package com.trust.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.trust.entity.SetupBase;
import com.trust.mapper.SetupBaseMapper;
import com.trust.service.SetupBaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class SetupBaseServiceImpl extends ServiceImpl<SetupBaseMapper, SetupBase> implements SetupBaseService {

    @Override
    public List<SetupBase> dropDownList() {
        LambdaQueryWrapper<SetupBase> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(SetupBase::getEnabled, 1);
        wrapper.orderByDesc(SetupBase::getId);
        return this.list(wrapper);
    }
}
